package com.jy.wms.web;

import com.jy.wms.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 上架任务
 * Created by syh on 2018/8/7.
 */
@Controller
@RequestMapping("/shelvesRouter")
public class WmsSjRwRouter {

    @Autowired
    SysMenuService menuService;
    /**
     * 调分页查询
     * @return
     */
    @RequestMapping(value = "getShelvesList/{menu}")
    public String getShelvesList(@PathVariable("menu") String menu, Model model){
        model.addAttribute("functions",menuService.getFunctions(menu));
        return  "task/wmsshelves/shelvesList";
    }

    /**
     * 跳生成
     * @param yqdhbdid
     * @param model
     * @return
     */
    @RequestMapping(value = "toAddShelvesRw")
    public String toAddShelvesRw(String yqdhbdid,Model model){
        model.addAttribute("yqdhbdid",yqdhbdid);
        return  "task/wmsshelves/addShelvesRw";
    }

    /**
     * 跳查看明细
     * @param yqdhbdid
     * @param model
     * @return
     */
    @RequestMapping(value = "toChakanMx")
    public String toChakanMx(String yqdhbdid,Model model){
        model.addAttribute("yqdhbdid",yqdhbdid);
        return  "task/wmsshelves/shelvesMx";
    }

    /**
     * 跳详情
     * @param yqdhbdid
     * @param model
     * @return
     */
    @RequestMapping(value = "getFindQqxq")
    public String getFindQqxq(String yqdhbdid,Model model){
        model.addAttribute("yqdhbdid",yqdhbdid);
        return  "task/wmsshelves/shelvesQqXiangxi";
    }
}